package com.ping.model;


public enum ResponseEnum {
	SUCCESSFUL(0, "Operate successfully!"),
	JSON_PARSE_ERROR(1, "Parse json ocurs error!"),
	JSON_PUT_ERROR(2, "Put value into json object occurs error!"),
	NULL_RESULTSET(3, "Result set is null!"),
	NOT_PERMISSION(4, "Permission denied"),
	LACK_NACESSARY_PARAMATERS(5, "Error of necessary parameters"),
	
	QUERY_PARAM_ERROR1(101, "Query param does not exist!"),
	QUERY_PARAM_ERROR2(102, "Query param is error!"),
	
	BASESERVICE_ERROR1(201, "size of params is not equals to size of values"),
	BASESERVICE_ERROR2(202, "errors ocurs when operate database!"),
	
	USERSERVICE_ERROR1(301, "Name or password is error!"),
	
	PINGSERVICE_ERROR1(401, "Do not know what operation is doing"),
	;
	
	private String key;
	private int value;
	private String desc;
	
	private ResponseEnum(){
	}
	
	private ResponseEnum(int value, String desc){
		this.key = "desc";
		this.value = value;
		this.desc = desc;
	}
	
	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}

	
